package com.heying.springcore.aop.jdbc.service.jdbc;

import com.heying.springcore.aop.jdbc.entity.Customer;
import com.heying.springcore.aop.jdbc.repository.CustomerRepository;
import com.heying.springcore.aop.jdbc.service.CustomerService;
import org.springframework.stereotype.Service;

import javax.inject.Inject;

@Service
public class JdbcCustomerService implements CustomerService {

    private CustomerRepository customerRepository;

    @Inject
    public JdbcCustomerService(CustomerRepository customerRepository) {
        this.customerRepository = customerRepository;
    }

    @Override
    public Customer queryByCustomer(String customer) {
        return customerRepository.queryCustomerByCustomer(customer);
    }
}
